import java.util.Scanner;

/**
 * @author: gao
 * @create-date: 2025/6/1 16:05
 */

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int n = in.nextInt();
            System.out.println(Callatz(n));
        }
    }

    public static int Callatz(int n) {
        int count = 0;
        while (true) {
            if (n % 2 == 0) {
                n = n / 2;
                count++;
            } else if (n != 1 && n % 2 != 0) {
                n = (3 * n + 1) / 2;
                count++;
            } else if (n == 1) {
                break;
            }
        }
        return count;
    }
}